// Copyright (c) Appeon. All rights reserved.
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. 
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

namespace SnapObjects.Data
{
    /// <summary>
    ///     Specifies the query method to be used when loading the data for a property where the EmbeddedModel 
    ///     attribute is applied in a model class.
    /// </summary>
    public enum QuerySelector
    {
        /// <summary>
        ///     Retrieves the first column in the first row for the specified SQL expression.
        /// </summary>
        Scalar,

        /// <summary>
        ///     Retrieves the first column in the first row for the specified SQL expression.
        /// </summary>
        ScalarByKey,

        /// <summary>
        ///     Retrieves records according to the SQL query predefined.
        /// </summary>
        Select,

        /// <summary>
        ///     Retrieves records according to the primary key.
        /// </summary>
        SelectByKey,

        /// <summary>
        ///     Returns the number of rows in the result set.
        /// </summary>
        SelectCount,

        /// <summary>
        ///     Returns the number all distinct values specified by the SQL expression.
        /// </summary>
        SelectDistinctCount,

        /// <summary>
        ///     Retrieves the maximum value for the specified SQL expression.
        /// </summary>
        SelectMax,

        /// <summary>
        ///     Retrieves the minimum value for the specified SQL expression.
        /// </summary>
        SelectMin,

        /// <summary>
        ///     Retrieves the average value using the specified SQL expression.
        /// </summary>
        SelectAvg,

        /// <summary>
        ///     Retrieves the sum value using the specified SQL expression.
        /// </summary>
        SelectSum
    }
}
